package Text01;

import java.util.jar.Manifest;

public class seven {
    public static void main(String[] args) {
        String S1= "hello java";
        String S2 = "hello java";
        //字符串 比较相等 equals方法
        if (S1.equals(S2)) {
            String newS1 = S1.replace("", "");
            String replacenew1 = newS1.replace("", "");
            System.out.println("替换前的字符串:" + S1);
            System.out.println("替换后的字符串:" + replacenew1);
        }else{
            System.out.println("两字符串不相等,无法执行替换操作");
        }
    }
}
